{extend name="ashippingguide/Public/base" /}
{block name="container"}
<!-- 标题 -->
<div class="page-heade clearfix">
    <h2 class="title_color text-center">
        <a class="col-md-4 title_color H_right" style="font-size: 16px;color:#333;" href="{:url('ashippingguide/entryapply')}">导购入职申请</a>
        <a class="col-md-4 title_color H_right" style="font-size: 16px;" href="{:url('ashippingguide/accidentapply')}">导购异动申请</a>
        <a class="col-md-4 title_color H_right  H_active" style="font-size: 16px;color:#333;" href="{:url('ashippingguide/quitapply')}">导购离职申请</a>
    </h2>
</div>
<!-- 标题 -->
<div>
    <form action="" class="form-inline" id="form1">
        <table class="row-margin-top tab-content table-bordered table" border="1">
            <tr>
                <td><a href="{:url('ashippingguide/addapplyp')}?type=1" class="btn btn-sm btn-info">新增导购离职申请</a></td>
            </tr>
        </table>
    </form>
    <table class="table table-striped table-bordered table-hover bud_hei text-center">
        <tr class="info">
            <td>NO.</td>
            <td>编号</td>
            <td>主题</td>
            <td>状态</td>
            <td>填写时间</td>
            <td>操作</td>
        </tr>
    {notempty name="data"}
    {volist name="data" id="list"}
    <tr>
        <td>{$i}</td>
        <td><a href="{:url('ashippingguide/guideInfo')}?id={$list.apple_id});">{$list.no}</a></td>
        <td class="text-left">{$list.theme}</td>
        <td>{$list.state}</td>
        <td>{$list.fillinDate}</td>
        <td><a href="javascript:;">提交工作流</a>&nbsp;<a href="{:url('ashippingguide/quitguidep')}?id={$list.apple_id}" class="modify">修改</a>&nbsp;<a href="javascript:;" class="delthis" onclick="del({$list.apple_id})">删除</a></td>
    </tr>
    {/volist}
    {else /}
    </table>
    <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3>
    {/notempty}
<script>
    $(document).ready(function () {
        $('#reset').on('click', function () {
            $("#form1 input").each(function () {
                $(this).val('');
            });
            $("#form1 select").each(function () {
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })
    function del(id){
        swal({
            title: "",
            text: "确定删除？不可恢复",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "确定",
            cancelButtonText: "返回"
        },function () {
           $.get("{:url('ashippingguide/delquitapply')}",{id:id},function (e) {
               if(e.success){
                   location.reload();
               }else{
                   swal('',e.msg,'warning');
               }
           },'json');
        })
    }
</script>
{/block}
